﻿using Caliburn.Micro;

namespace SamizdatSearch
{
  public class PasswordViewModel : Screen
  {
    public string Password
    {
      get { return _password; }
      set
      {
        if (_password == value) return;
        _password = value;
        NotifyOfPropertyChange(() => Password);
      }
    }

    private string _password;

    public PasswordViewModel()
    {
      DisplayName = "Ввод пароля";
    }

    public bool IsAccepted { get; private set; }
    public void Accept()
    {
      IsAccepted = true;
      TryClose();
    }
  }
}